<?php
$project_path = dirname(__FILE__);
include_once($project_path.'/class/fw/db/dbEngin.class.php5');
include_once($project_path.'/class/fw/db/db.class.php5');
include_once($project_path.'/class/fw/db/dbObject.class.php5');
include_once($project_path.'/class/fw/converter.class.php5');
include_once($project_path.'/class/fw/tools.class.php5');

$conf = array();
include_conf();

function include_conf()
{
	global $conf, $project_path;

	$conf_path =  $project_path.'/conf';
	if(is_dir($conf_path))
	{
		$h = opendir($conf_path);
		while($f = readdir($h))
		{
			if(!is_file($conf_path.'/'.$f))
			{
				continue;
			}
			if(substr($f, -10)!='.conf.php5')
			{
				continue;
			}
			include($conf_path.'/'.$f);
		}
		closedir($h);
	}
}


/**
 * On l'inclu dans la page bdd_tools, car il est fort probable que ce soit la
 * page la plus souvent appelée
 */
if (get_magic_quotes_runtime())
{
	set_magic_quotes_runtime(0);                        // turn off magic_quotes_runtime
	if (get_magic_quotes_runtime())
	{
		return $this->error('Could not disable magic_quotes_runtime - cannot work properly with this setting enabled');
	}
}
/**
 *
 */
if (get_magic_quotes_gpc())
{
	function stripslashes_deep($value)
	{
		$value = is_array($value) ? array_map('stripslashes_deep', $value) : stripslashes($value);
		return $value;
	}
	$_GET = array_map('stripslashes_deep', $_GET);
	$_POST = array_map('stripslashes_deep', $_POST);
	$_COOKIE = array_map('stripslashes_deep', $_COOKIE);
}
?>